/**************************
* @Summary
* @Author 20009200303 赵传博
* @Date 6/7/2022
* @Note
*****************************/

#ifndef EX6_NUMBERNODE_H
#define EX6_NUMBERNODE_H
#include "LeafNode.h"

class NumberNode : public LeafNode{
    ExprNode(Token_type tokType, ExprNode* left, ExprNode* right, double value = 0);
    //计算本表达式的值
    virtual double calculate();

    //getters and setters
    virtual ExprNode* getLeft() const { return left; }
    virtual ExprNode* getRight() const { return right; }


    virtual Token_type getTokType() const;
    virtual double getValue() const;
    virtual void setAssignEnd();

    //输出表达式
    virtual void getText_mid();         //中缀
    virtual void getText_postfix();     //后缀
    virtual void getText_prefix();      //前缀
};


#endif //EX6_NUMBERNODE_H
